package com.bw.order_module.confirm;

import android.widget.ImageView;

import com.bw.imgload_sdk.LoadImgUtils;
import com.bw.order_module.R;
import com.bw.order_module.entity.OrderGoods;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

public class ConfirmAdapter extends BaseQuickAdapter<OrderGoods, BaseViewHolder> {

    public ConfirmAdapter() {
        super(R.layout.item_order_goods_item);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, OrderGoods orderGoods) {
        ImageView mGoodsIconIv = baseViewHolder.getView(R.id.mGoodsIconIv);
        baseViewHolder.setText(R.id.mGoodsDescTv,orderGoods.goods_desc);
        baseViewHolder.setText(R.id.mGoodsSkuTv,orderGoods.goods_sku);
        baseViewHolder.setText(R.id.mGoodsPriceTv,orderGoods.goods_price);
        baseViewHolder.setText(R.id.mGoodsCountTv,""+orderGoods.goods_count);
        LoadImgUtils.loadMatchImg(orderGoods.goods_icon,mGoodsIconIv);
    }
}
